package com.wuchao.controller;

//import com.alibaba.fastjson.JSON;
//import com.github.pagehelper.PageInfo;
//import com.wuchao.entity.Entry;
//import com.wuchao.service.EntryService;
//import com.wuchao.service.T169Service;
//import com.wuchao.service.impl.Xmlimpl;
//import org.apache.commons.io.FilenameUtils;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.Model;
//import org.springframework.validation.BindingResult;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//import org.springframework.web.servlet.ModelAndView;
//
//import javax.annotation.Resource;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpSession;
//import java.io.File;
//import java.io.IOException;
//import java.text.DateFormat;
//import java.text.ParseException;
//import java.text.SimpleDateFormat;
//import java.util.*;

import com.wuchao.service.T169Service;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author wuchao66
 * @Date 2023/10/19 9:28
 * @PackageName:com.wuchao.controller
 * @ClassName: EntryController
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
@Controller
public class OracleController {//控制器

    @Resource
    T169Service t169Service;

//将请求映射到标注@RequestMapping注解的控制器和处理方法上
    @RequestMapping("orcl/{id}")//op.equals (add)
    public String showorcl(Model model, @PathVariable("id") int id){//主推 系统传参
        Map<String,Object> map=new HashMap<>();
        map.put("vid",id);
        t169Service.findT169ById169(map);
        Date vtime =(Date) map.get("vtime");
        model.addAttribute("vtime",vtime);
        return "orcl";
    }


}
